<template>
	<van-grid column-num="2" class="grid">
		<van-grid-item v-for="(item, index) in gridArray" :key="index" use-slot class="grid-item">
			<img :src="item.iconPath" alt="">
			<span>{{item.text}}</span>
		</van-grid-item>
	</van-grid>
</template>

<script>
	export default {
		name:"grid",
		data() {
			return {
				gridArray: [
					{
						iconPath: "../../static/images/index_grid1.png",
						text: "成绩查询",
					}, {
						iconPath: "../../static/images/index_grid2.png",
						text: "课程表",
					}, {
						iconPath: "../../static/images/index_grid3.png",
						text: "今日餐饮",
					}, {
						iconPath: "../../static/images/index_grid4.png",
						text: "校历",
					}
				]
			};
		}
	}
</script>

<style lang="scss">
	.grid{
		.grid-item{
			img{
				width: 100rpx;
				height: 100rpx;
			}
			span{
				margin-top: 5rpx;
			}
		}
	}
</style>
